<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

require_once 'Zend/Application.php';
require_once 'Zend/Config/Ini.php';

// Set configuration
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini',
        APPLICATION_ENV, true);

$application = new Zend_Application(
    APPLICATION_ENV,
    $config
);

$bootstrap = $application->getBootstrap();

$bootstrap->bootstrap('autoload');
$bootstrap->bootstrap('db');
$bootstrap->bootstrap('translate');